package com.example.test;

/**
 * Create with Intellij idea
 * User:鲁智明
 * Date:2018/10/14
 * Time:18:36
 */
public class test0010 {

    //静态只会初始化一次
    static {
        System.out.println("1.静态代码块...");
        age=600;
    }
    private static int age=500;

    public test0010(){
        System.out.println("2.构造函数初始化...");
    }

    public static void main(String[] args) {
        test0010 test001 = new test0010();
        test0010 test002 = new test0010();
        System.out.println("age:"+age);


    }
}
